<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

class Correo extends AppModel {
    public $useTable = 'correos';
    
    public function regresaBase(){
        return $this->getDataSource();
    }  
    public function regresaCorreosC($id){
        $c = $this->find('all',array(
            'conditions'=> array('id_cliente'=>$id),
            'order' => 'id ASC',
            'callbacks' => false
          ));
        $correos = array();
        for($i = 0;$i<count($c);$i++)
            $correos[$i]=$c[$i]['Correo'];
        return $correos;
    }
    public function regresaCorreosP($id){
        $c = $this->find('all',array(
            'conditions'=> array('id_prove'=>$id),
            'order' => 'id ASC',
            'callbacks' => false
          ));
        $correos = array();
        for($i = 0;$i<count($c);$i++)
            $correos[$i]=$c[$i]['Correo'];
        return $correos;
    }
}
?>
